package cn.jy.boot.mapper;

import cn.jy.boot.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface  UserMapper extends BaseMapper<User> {
    @Select("select * from user where id = #{id}")
    User getUserById(long id);
//    方法 想要有分页的功能  第一个参数必须是Page
    Page<User> selectUserByAge(@Param("page") Page<User> page,@Param("age") Integer age);
}
